package com.okyai.cms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.okyai.cms.mapper.CmsCustomTagMapper;
import com.okyai.cms.domain.CmsCustomTag;
import com.okyai.cms.service.ICmsCustomTagService;
import com.okyai.common.core.text.Convert;

/**
 * 标签Service业务层处理
 * 
 * @author okyai
 * @date 2020-12-08
 */
@Service
public class CmsCustomTagServiceImpl implements ICmsCustomTagService 
{
    @Autowired
    private CmsCustomTagMapper customTagMapper;

    /**
     * 查询标签
     * 
     * @param id 标签ID
     * @return 标签
     */
    @Override
    public CmsCustomTag selectCustomTagById(Long id)
    {
        return customTagMapper.selectCustomTagById(id);
    }

    /**
     * 查询标签列表
     * 
     * @param customTag 标签
     * @return 标签
     */
    @Override
    public List<CmsCustomTag> selectCustomTagList(CmsCustomTag customTag)
    {
        return customTagMapper.selectCustomTagList(customTag);
    }

    /**
     * 新增标签
     * 
     * @param customTag 标签
     * @return 结果
     */
    @Override
    public int insertCustomTag(CmsCustomTag customTag)
    {
        return customTagMapper.insertCustomTag(customTag);
    }

    /**
     * 修改标签
     * 
     * @param customTag 标签
     * @return 结果
     */
    @Override
    public int updateCustomTag(CmsCustomTag customTag)
    {
        return customTagMapper.updateCustomTag(customTag);
    }

    /**
     * 删除标签对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteCustomTagByIds(String ids)
    {
        return customTagMapper.deleteCustomTagByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除标签信息
     * 
     * @param id 标签ID
     * @return 结果
     */
    @Override
    public int deleteCustomTagById(Long id)
    {
        return customTagMapper.deleteCustomTagById(id);
    }
}
